<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../js/vue.js"></script>

</head>
<body>

<div id="div1">
    <div>输出对象</div>

    <div v-if="v==22" v-for="(v,k,i) in obj1 ">{{i+' ' +k+' '+v}}</div>
                <!--
                    i 代表当前遍历到哪一个item
                    k 代表当前遍历到哪个属性
                    v 代表当前遍历到哪个值
                -->

</div>

<script>

    const vueObj = new Vue({
        el:'#div1',
        data: {
          obj1:{
              username: 'list',
              age: 22,
              gender: 'Male'

          }

        },

    });
</script>
</body>
</html>